package com.xiaoq.sites.service.impl;

import java.util.List;

import com.xiaoq.vo.PagingVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.xiaoq.sites.entity.BannerEntity;
import com.xiaoq.sites.repository.IBannerRepository;
import com.xiaoq.sites.service.IBannerService;

@Component
public class BannerServiceImpl implements IBannerService {
	
	@Autowired
	private IBannerRepository bannerRep;

	@Override
	public List<BannerEntity> findBannerList(String channelCode,String cityCode) {
		
		return bannerRep.findBannerList(channelCode,cityCode);
	}

	@Override
	public boolean addBanner(BannerEntity bannerEntity) {
		return bannerRep.addBanner(bannerEntity);
	}

	@Override
	public boolean delBanner(String bannerId) {
		return bannerRep.delBanner(bannerId);
	}

	@Override
	public boolean updateBanner(BannerEntity bannerEntity) {
		return bannerRep.updateBanner(bannerEntity);
	}

	@Override
	public List<BannerEntity> findBannerList(PagingVo pvo, String cityCode) {
		return bannerRep.findBannerList(pvo,cityCode);
	}

	@Override
	public List<BannerEntity> findBannerByChannelCodeAndCityCodeList(PagingVo pvo,String channelCode, String cityCode) {
		return bannerRep.findBannerByChannelCodeAndCityCodeList(pvo,channelCode,cityCode);
	}

	@Override
	public BannerEntity findByBannerId(String bannerId) {
		return bannerRep.findByBannerId(bannerId);
	}

}
